import request from '@/utils/request'

// 获取跳检规则
export function getInspectionroleInfo(id) {
    return request({
        url: `/api/BaseData/Inspectionrole/${id}`,
        method: 'GET'
    })
}

// 获取跳检规则列表
export function getInspectionroleList(data) {
    return request({
        url: `/api/BaseData/Inspectionrole`,
        method: 'GET',
        data
    })
}

// 提交保存跳检规则
export function submitInspectionrole(data) {
    return request({
        url: '/api/BaseData/Inspectionrole',
        method: 'POST',
        data
    })
}

// 更新跳检规则
export function updateInspectionrole(data) {
    return request({
        url: `/api/BaseData/Inspectionrole/${data.id}`,
        method: 'PUT',
        data
    })
}

// 批量删除跳检规则
export function delInspectionroleBatch(data) {
    return request({
        url: `/api/BaseData/Inspectionrole/BatchRemove`,
        method: 'POST',
        data
    })
}
// 删除跳检规则
export function delInspectionrole(id) {
    return request({
        url: `/api/BaseData/Inspectionrole/${id}`,
        method: 'DELETE'
    })
}
// 获取所有跳检规则
export function getInspectionroleAll() {
    return request({
        url: `/api/BaseData/Inspectionrole/All`,
        method: 'GET'
    })
}
// 导出跳检规则
export function exportData(data) {
    return request({
        url: `/api/BaseData/Inspectionrole/Actions/Export`,
        method: 'GET',
        data
    })
}
// 导入
export function ImportData(data) {
  return request({
    url: '/api/BaseData/Inspectionrole/ImportData',
    method: 'post',
    data
  })
}
// 导入预览
export function ImportPreview(data) {
  return request({
    url: '/api/BaseData/Inspectionrole/ImportPreview',
    method: 'get',
    data
  })
}
// 模板下载
export function TemplateDownload() {
  return request({
    url: '/api/BaseData/Inspectionrole/TemplateDownload',
    method: 'get'
  })
}